﻿#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

//在字符串中找出连续最⻓的数字串
int main() {
    string str;
    cin >> str;

    int left = 0;
    int right = 0;
    int maxlength = -1;
    string res = "";

    while (right < str.size()) {
        if (str[right] >= '0' && str[right] <= '9') {
            ++right;
            continue;
        }
        else {
            if (left != right) {
                int length = right - left;
                if (maxlength < length) {
                    res = str.substr(left, length);
                    maxlength = length;
                }
            }

            ++right;
            left = right;
        }
    }

    if (left != right) {
        int length = right - left;
        if (maxlength < length) {
            res = str.substr(left, length);
            maxlength = length;
        }
    }

    cout << res;

    return 0;
}


int gcb(int a, int b)
{
    if (b == 0)
    {
        return a;
    }

    return gcb(b, a % b);
}

//计算两个数的最小公倍数
//等于两个数相乘除以他们的最大公约数
//最大公约数用辗转相除法
int main() {
    int a = 0;
    int b = 0;
    cin >> a;
    cin >> b;

    cout << a * b / gcb(a, b);

    return 0;
}